﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                   namespace="SmartHRMS.Model"
                   assembly="SmartHRMS.Model">

  <class name="SmartHRMS.Model.Account.Permission,SmartHRMS.Model" table="Accounts_Permissions" lazy="false">

    <id name="PermissionId" column="PermissionId" type="guid">
      <generator class="guid" />
    </id>

    <property name="PermissionKey">
      <column name="PermissionKey" not-null="true" sql-type="nvarchar(250)" length="250" />
    </property>


    <set name="Role" table="Accounts_RolePermissions" inverse="true" cascade="none" generic="true">
      <key column="PermissionId"/>
      <many-to-many class="SmartHRMS.Model.Account.Role,SmartHRMS.Model" column="RoleId"></many-to-many>
    </set>

  </class>

</hibernate-mapping>